package com.cmx.controller;

import com.cmx.model.Topic;
import com.cmx.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by cmx on 2017/5/13.
 */

@RestController
@RequestMapping(value = "/test")
public class TestController extends BaseController{

    @Autowired
    private TestService testService;
    @RequestMapping(value = "/base_dao")
    public ResponseEntity testBaseDao(Integer tid){

        Topic topic = testService.selectOne(tid);

        return new ResponseEntity(topic, HttpStatus.OK);

    }
}
